package cn.sdack.go.users.dao;

import cn.sdack.go.common.entities.users.AuthorityEntity;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author sdack
 * @date 2024/1/8
 */
public interface AuthorityDao extends JpaRepository<AuthorityEntity,Long> {

    Long countByDelIsNull();

    AuthorityEntity findByCodeAndGid(String code,Long gid);

    List<AuthorityEntity> findAllByGidAndCodeIn(Long gid,List<String> codes);

    List<AuthorityEntity> findAllByGidAndCodeStartingWith(Long gid,String codes);

}
